<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html>
<%@ taglib prefix="s" uri="/struts-tags"%>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<script type="text/javascript">
	function show() {
		document.getElementById('newdetail').style.display = "block";
	}
	function hide() {
		document.getElementById('newdetail').style.display = "none";
	}

	function Blank_TextField_Validator() {

		if (InsertJSWorkEx.CompanyName.value == "") {
			alert("Please enter company name.");
			InsertJSWorkEx.CompanyName.focus();
			return (false);
		}

		if (InsertJSWorkEx.years.value == "") {
			alert("Please enter years of experience.");
			InsertJSWorkEx.years.focus();
			return (false);
		}

		return (true);
	}
</script>
</head>
<body onload="hide()">
	<div class="container-fluid">
		<div class="row-fluid">

			<div class="span6 offset3">
				<ul class="nav nav-pills">
					<li><a href="EditJSProfile">Basic Details</a></li>
					<li><a href="EditJSEQ">Educational Qualifications</a></li>
					<li class="active"><a href="EditJSWorkEx">Work Experience</a></li>
					<li><a href="EditJSSkills">Technical Skills</a></li>
				</ul>
			</div>


			<div class="span8 offset2">

				<s:if test="hasActionErrors()">
					<br />
					<s:iterator value="actionErrors">
						<div class="alert alert-error">
							<button type="button" class="close" data-dismiss="alert">&times;</button>
							<s:property />
						</div>
					</s:iterator>
				</s:if>

				<br />
				<div align="center">
					<font size="5" face="Georgia"><b>Work Experiences</b></font> <br />
					<br /> <br />
				</div>

				<table
					class="table-bank table-bank-bordered table-bank-hover table-bank-striped"
					id="results">
					<tr>
						<th style="text-align: center"><font size="4" face="Georgia">Company</font></th>
						<th style="text-align: center"><font size="4" face="Georgia">Years</font></th>
						<th style="text-align: center"><font size="4" face="Georgia">Delete</font></th>
					</tr>
					<s:iterator value="workExperienceList">
						<tr>
							<td style="text-align: center"><s:property
									value="CompanyName" /></td>
							<td style="text-align: center"><s:property value="years" /></td>
							<td style="text-align: center"><a
								href="DeleteJSWorkEx?expID=<s:property
									value="expID" />">
									<i class="icon-trash"></i>
							</a></td>
						</tr>
					</s:iterator>
				</table>

				<div id="pageNavPosition" align="center"></div>

				<div align="center">
					<form action="InsertJSWorkEx" class="form-inline" id="newdetail"
						onsubmit="return Blank_TextField_Validator()"
						name="InsertJSWorkEx">
						<input type="text" class="input-medium" placeholder="Company"
							name="CompanyName"> <input type="text"
							class="input-medium" placeholder="Years of Experience"
							name="years">
						<button type="submit" class="btn btn-medium">Save</button>
					</form>
				</div>
				<button class="btn btn-small btn-primary pull-right" type="button"
					onclick="show()">Add Row</button>
			</div>
		</div>
	</div>

	<script type="text/javascript">
		var pager = new Pager('results', 10);
		pager.init();
		pager.showPageNav('pager', 'pageNavPosition');
		pager.showPage(1);
	</script>
	<br />
	<br />
	<br />

</body>
</html>